package com.gk.controller;

import com.gk.feignclients.HystrixClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class TestDemoController {

    //注入openFeign 客户端对象
    @Autowired
    private HystrixClient hystrixClient;

    @GetMapping("test")
    public String test() {
        System.out.println("test ok！！！");
        String demoResult = hystrixClient.demo(21);
        log.info("demo result:{}", demoResult);
        return "test ok ";
    }
}
